<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<p>hello</p>
<div id="subapp">

</div>
<script>
    const sub = document.getElementById('subapp')
    const shadow = sub.attachShadow({mode:'open'})
    shadow.innerHTML = `
    <p>这是shadow的内容</p>
    <style>
        p { color:red }
    </style>
    `
</script>
</body>
</html>
